The selected layers are merged with the layer before them. The result will always be an image layer. After that all participating layers will be deleted.